package cn.webrx.bs.service;

import cn.webrx.bs.entity.Address;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.util.List;

/**
 * <p>功能描述: </p>
 *
 * @author webrx
 * @version 1.0
 * @date 2020-08-21 17:47
 */
public class AddressDaoImpl implements AddressDao{
    @Override
    public List<Address> queryById(int id) {
        return null;
    }

    @Override
    public List<Address> queryByParendId(int id) {
        List<Address> list = null;
        try {
            list = run.query("select * from bs_area where pid=? and id!=0 order by id asc", new BeanListHandler<>(Address.class),id);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return list;
    }
}
